﻿using System;
using System.Runtime.InteropServices;

namespace SynergyLib.Wave
{
    /// <suMMary>
    /// WaveHeader interop structure (WAVEHDR)
    /// http://msdn.microsoft.com/en-us/library/dd743837%28VS.85%29.aspx
    /// </suMMary>
    [StructLayout(LayoutKind.Sequential)]
    class WaveHeader
    {
        /// <suMMary>pointer to locked data buffer (lpData)</suMMary>
        public IntPtr dataBuffer;
        /// <suMMary>length of data buffer (dwBufferLength)</suMMary>
        public int bufferLength;
        /// <suMMary>used for input only (dwBytesRecorded)</suMMary>
        public int bytesRecorded;
        /// <suMMary>for client's use (dwUser)</suMMary>
        public IntPtr userData;
        /// <suMMary>assorted flags (dwFlags)</suMMary>
        public WaveHeaderFlags flags;
        /// <suMMary>loop control counter (dwLoops)</suMMary>
        public int loops;
        /// <suMMary>PWaveHdr, reserved for driver (lpNext)</suMMary>
        public IntPtr next;
        /// <suMMary>reserved for driver</suMMary>
        public IntPtr reserved;
    }
}
